//
//  E7Rule.h
//  EndlessBattle
//
//  Created by cc on 12-3-20.
//  Copyright (c) 2012年 PalmGame. All rights reserved.
//

#ifndef EndlessBattle_E7Rule_h
#define EndlessBattle_E7Rule_h

#include "E7GameDefine.h"

class CE7Rule
{
public:
    CE7Rule() ;
    ~CE7Rule() ;

    bool CheckCreateUnit(int countryid, int townid, eUnitValue unitvalue, int cellid) ;
    int  CreateUnit(int countryid, int townid, eUnitValue unitvalue, int cellid) ;

    bool CheckAttackWithCreate(int countryid, int townid, eUnitValue unitvalue, int cellid) ;
    int  AttackWithCreate(int countryid, int townid, eUnitValue unitvalue, int cellid) ;

    bool CheckAttachUnit(int unitid, int addunitid) ;
    int  AttachUnit(int unitid, int addunitid) ;
    
    bool CheckAttachWithCreate(int unitid, eUnitValue uv) ;
    bool AttachWithCreate(int unitid, eUnitValue uv) ;

    bool CheckAttack(int countryid, int unitid, int cellid) ;
    bool Attack(int countryid, int unitid, int cellid) ;

    bool CheckMove(int countryid, int unitid, int cellid) ;
    bool Move(int countryid, int unitid, int cellid) ;

    bool CheckGameEnd() ;
    int  GetWinnerID() { return m_iWinnerID ; }

//    void Achievement() ;
private:
    int    m_iWinnerID ;
} ;

#endif


















